﻿
Ext.define('SHApp.System.User.Grid', {
    extend: 'Ext.panel.Panel',
    alias: 'shapp.system.user.grid',
    requires: ['SHApp.Member.Mfile.Grid', 'SHApp.System.Shop.Grid1'],
    layout: { type: "border" },
    pvalue: 0,
    initComponent: function () {
        var me = this;
        Ext.apply(this);
        this.createItem();
        this.callParent(arguments);
    },
    createItem: function () {
        var me = this;
        me.items = [
            {
                width: 250,
                pvalue: me.pvalue,
                region: "west",
                split: true,
                xtype: 'shopgrid',
                id: "shopID",
                title: "店铺查询",
                height: "100%",
                listeners: {
                    selectionchange: function (model, records) {
                        if (records[0]) {
                            var grid = Ext.getCmp("userID");
                            grid.loadByDepartID(records[0].data.Id, records[0].data.Name);

                        }
                    }
                }
            }, {
                pvalue: me.pvalue,
                flex: 1,
                region: "center",
                xtype: 'mfilegrid',
                id: "userID",
                title: "员工管理",
                height: "100%"
            }
        ];
    }


})

